<?php
class Cabbie
{
    static public $index_files = array("index.htm", "index.html", "index.php");
    static public $default_layout = "main_layout";
    static public $approot = "/yourcabbiedir/app";
    static public $root = "/yourcabbiedir/cabbie";
    static public $language = "en";
    static public $uri_params = "";
    static public $params = Array();
    static public $temp_path = "/tmp";
    static public $slash = "/";
    static public $url_prefix = ""; /* NO TRAILING SLASH! */
     static public $routes = Array();
	static public $class_cache = false; //use Level 1 caching for class includes
	static public $class_cache_ttl = 120; // seconds to retain the Level 1 cache
    static public function autoload_cabbie($class_name)
    {
      if (strstr($class_name, "MemberFof"))
      {
        $id = str_replace("MemberFof", "", $class_name);
        eval("class $class_name extends ActiveRecord { var \$table_name = \"member_fof_$id\"; }");
      }
    }

    static public function map_route($route, $where)
    {
      $r["route"] = explode("/", $route);
      $r["controller"] = $where["controller"];
      $r["action"] = $where["action"];

      $keywords = array();

      /* set all other variables */
      foreach ($where as $key => $val)
      {
        if ($key != "action" && $key != "controller" && $key != "route")
          $keywords[$key] = $val;
      }

      $r["keywords"] = $keywords;

      Cabbie::$routes[] = $r;
    }
	/**
    * sanitize tiny mce post.
    */
    static public function tinymce_sanitize( $comment_post )
    {
		$allowedTags='<p><strong><em><u><img>';
	 	$r = strip_tags(stripslashes( $comment_post ), $allowedTags);
	 	return $r;
	}
}

?>